package com.jxj.entity;

import lombok.Data;

import java.io.IOException;
import java.util.Base64;

/**
 * @Author Cambria
 * @creat 2021/9/7 21:18
 */
@Data
public class ResumeDTO {

    private String name;

    private String sex;

    private String colleg;

    private String specialize;

    private String study_store;

    private String polity_mask;

    private String qq;

    private String phone;

    private String societies_num_1;

    private String societies_num_2;

    private String societies_name_1;

    private String societies_name_2;

    private String photo;

    public ResumeDTO(ResumeVO vo) {
        name = vo.getName();
        sex = vo.getSex();
        colleg = vo.getCollege();
        specialize = vo.getSpecialize();
        study_store = vo.getStudy_store();
        polity_mask = vo.getPolity_mask();
        qq = vo.getQq();
        phone = vo.getPhone();
        societies_name_1 = vo.getSocieties_name_1();
        societies_name_2 = vo.getSocieties_name_2();
        societies_num_1 = vo.getSocieties_num_1();
        societies_num_2 = vo.getSocieties_num_2();
        try {
            photo = Base64.getEncoder().encodeToString(vo.getPhoto().getBytes());
        } catch (IOException e) {
            photo = "";
        }
    }

}
